package com.agency8x.sqls;

public class WithdrawSqls implements ModelSqlInterface {
	public static final WithdrawSqls me=new WithdrawSqls();

	private String table="t_finance_withdraw";

	@Override
	public String getTableName() {
		return table;
	}

	@Override
	public String getPagingSelectSql() {
		return "select w.* , b.blance,b.frozen_blance, u.nickname, adm.realname as auditor_name,u.mobile ";
	}

	@Override
	public String getPagingExceptSelectSql() {
		return "from t_finance_Withdraw  w left join t_user_finance_account b on w.user_id =b.user_id "
				+ "left join t_user u on  w.user_id =u.user_id "
				+ "left join t_user_admin adm on w.auditor_id=adm.user_id ";
	}

	public String getFindByIdSql() {
		return "select w.*, u.nickname, u.mobile, acc.blance, acc.frozen_blance from t_finance_withdraw w left join t_user u on w.user_id=u.user_id "
				+ "left join t_user_finance_account acc on w.user_id=acc.user_id where w.id=?";
	}

	public String getUpdateAuditorIdSql() {
		return "update t_finance_withdraw set auditor_id=? where id in";
	}

}
